<template>
  <div class="mymessage" v-show="isShow">
    <div class="text">
      {{ msg }}
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isShow: false,
      msg: "哈哈哈",
    };
  },
};
</script>
<style lang='less' scoped>
.mymessage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  .text {
    background: #fff;
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    padding: 20px 100px;
    border-radius: 4px;
  }
}
</style>